<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script type="module">
    // 按需引入
    // import {a,addA,reduceA,doubleA,getA} from "../js/md1.js";
    // import {b,addB,reduceB,doubleB} from "../js/md2.js";

    // 整体载入  => 载入模块暴露的所有变量和方法,整合到对象中
    // import * as _A from "../js/md1.js";
    // import * as _B from "../js/md2.js";
    // import * as _C from "../js/md3.js";
    // let {a,addA,reduceA,doubleA,getA}  = _A;

    // console.log(_A);
    // console.log(_B);
    // console.log(_C);

    // 模块值默认值
    // import x from "../js/md1.js"; // 声明一个变量x接收模块中的默认值
    
    // 混合使用  (默认值和按需引入可以同时使用)
    import x,{a} from "../js/md1.js";
    
    console.log(x);
    console.log(a);


</script>
</html>